﻿using Jim.OA;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jim.OA;


[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
public partial class HrmServicePortTypeClient : System.ServiceModel.ClientBase<HrmServicePortType>, HrmServicePortType
{

    /// <summary>
    /// 实现此分部方法，配置服务终结点。
    /// </summary>
    /// <param name="serviceEndpoint">要配置的终结点</param>
    /// <param name="clientCredentials">客户端凭据</param>
    static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);

    public HrmServicePortTypeClient() :
            base(HrmServicePortTypeClient.GetDefaultBinding(), HrmServicePortTypeClient.GetDefaultEndpointAddress())
    {
        this.Endpoint.Name = EndpointConfiguration.HrmServiceHttpPort.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }

    public HrmServicePortTypeClient(EndpointConfiguration endpointConfiguration) :
            base(HrmServicePortTypeClient.GetBindingForEndpoint(endpointConfiguration), HrmServicePortTypeClient.GetEndpointAddress(endpointConfiguration))
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }

    public HrmServicePortTypeClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
            base(HrmServicePortTypeClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }

    public HrmServicePortTypeClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
            base(HrmServicePortTypeClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
    {
        this.Endpoint.Name = endpointConfiguration.ToString();
        ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
    }

    public HrmServicePortTypeClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
            base(binding, remoteAddress)
    {
    }

    public System.Threading.Tasks.Task<bool> changeUserPasswordAsync(string in0, string in1, string in2)
    {
        return base.Channel.changeUserPasswordAsync(in0, in1, in2);
    }

    public System.Threading.Tasks.Task<string> getHrmJobTitleInfoXMLAsync(string in0, string in1, string in2)
    {
        return base.Channel.getHrmJobTitleInfoXMLAsync(in0, in1, in2);
    }

    public System.Threading.Tasks.Task<string> checkInvokeClientAsync()
    {
        return base.Channel.checkInvokeClientAsync();
    }

    public System.Threading.Tasks.Task<string> getDepartmentInfoWithPageAsync(string in0)
    {
        return base.Channel.getDepartmentInfoWithPageAsync(in0);
    }

    public System.Threading.Tasks.Task<string> getHrmDepartmentInfoXMLAsync(string in0, string in1)
    {
        return base.Channel.getHrmDepartmentInfoXMLAsync(in0, in1);
    }

    public System.Threading.Tasks.Task<string> SynSubCompanyAsync(string in0, string in1)
    {
        return base.Channel.SynSubCompanyAsync(in0, in1);
    }

    public System.Threading.Tasks.Task<JobTitleBean[]> getHrmJobTitleInfoAsync(string in0, string in1, string in2)
    {
        return base.Channel.getHrmJobTitleInfoAsync(in0, in1, in2);
    }
    /// <summary>
    /// 获取分部信息
    /// </summary>
    /// <param name="ipAddress"></param>
    /// <returns></returns>
    public System.Threading.Tasks.Task<SubCompanyBean[]> getHrmSubcompanyInfoAsync(string ipAddress)
    {
        return base.Channel.getHrmSubcompanyInfoAsync(ipAddress);
    }

    public System.Threading.Tasks.Task<string> getOneUserInfoAsync(string in0)
    {
        return base.Channel.getOneUserInfoAsync(in0);
    }

    public System.Threading.Tasks.Task<string> SynDepartmentAsync(string in0, string in1)
    {
        return base.Channel.SynDepartmentAsync(in0, in1);
    }

    public System.Threading.Tasks.Task<string> getUseridByWorkcodeAsync(string in0)
    {
        return base.Channel.getUseridByWorkcodeAsync(in0);
    }

    public System.Threading.Tasks.Task<UserBean[]> getHrmUserInfoAsync(string in0, string in1, string in2, string in3, string in4, string in5)
    {
        return base.Channel.getHrmUserInfoAsync(in0, in1, in2, in3, in4, in5);
    }

    public System.Threading.Tasks.Task<bool> checkUserAsync(string in0, string in1, string in2)
    {
        return base.Channel.checkUserAsync(in0, in1, in2);
    }

    public System.Threading.Tasks.Task<string> getJobtitleInfoWithPageAsync(string in0)
    {
        return base.Channel.getJobtitleInfoWithPageAsync(in0);
    }

    public System.Threading.Tasks.Task<string> SynHrmResourceAsync(string in0, string in1)
    {
        return base.Channel.SynHrmResourceAsync(in0, in1);
    }

    public System.Threading.Tasks.Task<DepartmentBean[]> getHrmDepartmentInfoAsync(string in0, string in1)
    {
        return base.Channel.getHrmDepartmentInfoAsync(in0, in1);
    }

    public System.Threading.Tasks.Task<string> getHrmUserInfoWithPageAsync(string in0)
    {
        return base.Channel.getHrmUserInfoWithPageAsync(in0);
    }

    public System.Threading.Tasks.Task<string> getHrmSubcompanyInfoWithPageAsync(string in0)
    {
        return base.Channel.getHrmSubcompanyInfoWithPageAsync(in0);
    }

    public System.Threading.Tasks.Task<string> SynJobtitleAsync(string in0, string in1)
    {
        return base.Channel.SynJobtitleAsync(in0, in1);
    }

    public System.Threading.Tasks.Task<string> getHrmSubcompanyInfoXMLAsync(string in0)
    {
        return base.Channel.getHrmSubcompanyInfoXMLAsync(in0);
    }

    public System.Threading.Tasks.Task<string> getHrmUserInfoXMLAsync(string in0, string in1, string in2, string in3, string in4, string in5)
    {
        return base.Channel.getHrmUserInfoXMLAsync(in0, in1, in2, in3, in4, in5);
    }

    public virtual System.Threading.Tasks.Task OpenAsync()
    {
        return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
    }

    public virtual System.Threading.Tasks.Task CloseAsync()
    {
        return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
    }

    private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
    {
        if ((endpointConfiguration == EndpointConfiguration.HrmServiceHttpPort))
        {
            System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
            result.MaxBufferSize = int.MaxValue;
            result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
            result.MaxReceivedMessageSize = int.MaxValue;
            result.AllowCookies = true;
            return result;
        }
        throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
    }

    private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
    {
        if ((endpointConfiguration == EndpointConfiguration.HrmServiceHttpPort))
        {
            return new System.ServiceModel.EndpointAddress("http://oa.frogpump.com/services/HrmService");
        }
        throw new System.InvalidOperationException(string.Format("找不到名称为“{0}”的终结点。", endpointConfiguration));
    }

    private static System.ServiceModel.Channels.Binding GetDefaultBinding()
    {
        return HrmServicePortTypeClient.GetBindingForEndpoint(EndpointConfiguration.HrmServiceHttpPort);
    }

    private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
    {
        return HrmServicePortTypeClient.GetEndpointAddress(EndpointConfiguration.HrmServiceHttpPort);
    }

    public enum EndpointConfiguration
    {

        HrmServiceHttpPort,
    }
}

